import type { PaginatedResponse, PaginationParams } from './api';

export interface WithdrawRecord {
  id: number;
  memberId: number;
  orderNo: string;
  amount: number;
  commissionFee: number;
  receivedAmount: number;
  bankId: number;
  status: number;
  statusString: string;
  remark: string;
  auditManagerId: number;
  auditAt: number;
  auditAtString: string;
  createdAt: number;
  createdAtString: string;
  updatedAt: number;
  updatedAtString: string;
  usdtChain: string;
  withdrawUsdtAddress: string;
  cardId?: number;
  cardNo?: string;
}

export type WithdrawListParams = PaginationParams;

export type WithdrawListResponse = PaginatedResponse<WithdrawRecord>;

export interface WithdrawFormData {
  amount: number;
  verifyCode: string;
  withdrawUsdtAddress: string;
}

export interface CardWithdrawParams {
  amount: number;
  cardId: number;
  walletType: number;
}

export interface CardUpdateRequest {
  CardId: number;
  Remark: string;
}

export const WithdrawStatus = {
  Pending: 10,    // 审核中
  Rejected: 20,   // 未通过
  Cancelled: 30,  // 取消
  Approved: 40,   // 通过
} as const;

export type WithdrawStatusType = typeof WithdrawStatus[keyof typeof WithdrawStatus];
